#pragma once

#include <pybind11/pybind11.h>

#define KIVA_ENABLE_IF(...) std::enable_if_t<__VA_ARGS__, int> = 0

#define KIVA_BINOP_LIST(T) \
  T(Add, +)                \
  T(Sub, -)                \
  T(Mult, *)               \
  T(Div, /)                \
  T(Mod, %)                \
  T(LShift, <<)            \
  T(RShift, >>)            \
  T(BitOr, |)              \
  T(BitXor, ^)             \
  T(BitAnd, &)

#define KIVA_BOOLOP_LIST(T) \
  T(Or, ||)                 \
  T(And, &&)

#define KIVA_COMPARE_LIST(T) \
  T(Eq, ==)                  \
  T(NotEq, !=)               \
  T(Gt, >)                   \
  T(Lt, <)                   \
  T(LtE, <=)                 \
  T(GtE, >=)

#define KIVA_AUGASSIGN_LIST(T) \
  T(Add, +=)                   \
  T(Sub, -=)                   \
  T(Mult, *=)                  \
  T(Div, /=)                   \
  T(Mod, %=)                   \
  T(BitOr, |=)                 \
  T(BitAnd, &=)                \
  T(BitXor, ^=)                \
  T(LShift, <<=)               \
  T(RShift, >>=)

#define KIVA_UNARYOP_LIST(T) \
  T(Invert, ~)               \
  T(Not, !)                  \
  T(UAdd, +)                 \
  T(USub, -)
